package cn.gson.boot.model.pojos;

import javax.persistence.*;
import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.List;
import java.util.Objects;

/*换货*/

@Entity
public class Huanhuo {
    private int hhId;//换货id
    private Kehu kH;//客户id
    private String hhDanhao;//换货单号
    private Timestamp hhTime;//换货时间
    private String hhYuanyin;//换货原因
    private String hhZhuangtai;//换货状态
    private String hhFangshi;//换货方式
    private String hhWuliugs;//换货物流公司
    private Dingdan dingdanByDdId;//订单对象（订单id）
    private String hhWuliuhao;//物流号
    private String hhBeizhu;//备注
    private BigDecimal hhMoney;//换货总额

    private String hhSh;

    private Integer hhYs;

    private Fahuo fahuo;//发货对象


    //public List<Dingdanxiangqing> hhddxqList;//订单详情集合
    public List<Fahuoxiangqing> hhfhList;//发货详情集合

    private String hhRk;//判断是否入库(z=已申请,y=已入库)
    private String hhWx;//判断是否需要维修
    private Integer hhWxwc;//判断是否维修完成(-1=>没有,0=>维修中,1=>成功,2=>维修失败)

    private String hhPeople;

    @Column(name = "hh_people")
    public String getHhPeople() {
        return hhPeople;
    }

    public void setHhPeople(String hhPeople) {
        this.hhPeople = hhPeople;
    }

    @Column(name = "hh_wxwc")
    public Integer getHhWxwc() {
        return hhWxwc;
    }

    public void setHhWxwc(Integer hhWxwc) {
        this.hhWxwc = hhWxwc;
    }

    @Column(name = "hh_wx")
    public String getHhWx() {
        return hhWx;
    }

    public void setHhWx(String hhWx) {
        this.hhWx = hhWx;
    }

    @Column(name = "hh_rk")
    public String getHhRk() {
        return hhRk;
    }

    public void setHhRk(String hhRk) {
        this.hhRk = hhRk;
    }

    @Column(name = "hh_sh")
    public String getHhSh() {
        return hhSh;
    }

    public void setHhSh(String hhSh) {
        this.hhSh = hhSh;
    }

    @Column(name = "hh_money")
    public BigDecimal getHhMoney() {
        return hhMoney;
    }

    public void setHhMoney(BigDecimal hhMoney) {
        this.hhMoney = hhMoney;
    }

    @Column(name = "hh_beizhu")
    public String getHhBeizhu() {
        return hhBeizhu;
    }

    public void setHhBeizhu(String hhBeizhu) {
        this.hhBeizhu = hhBeizhu;
    }

    @Column(name = "hh_ys")
    public Integer getHhYs() {
        return hhYs;
    }

    public void setHhYs(Integer hhYs) {
        this.hhYs = hhYs;
    }

    @Column(name = "hh_wuliuhao")
    public String getHhWuliuhao() {
        return hhWuliuhao;
    }

    public void setHhWuliuhao(String hhWuliuhao) {
        this.hhWuliuhao = hhWuliuhao;
    }

    @Id
    @Column(name = "hh_id", nullable = false)
    @GeneratedValue(strategy = GenerationType.IDENTITY,generator = "seq")
    public int getHhId() {
        return hhId;
    }

    public void setHhId(int hhId) {
        this.hhId = hhId;
    }


    @ManyToOne
    @JoinColumn(name = "k_id", referencedColumnName = "k_id")
    public Kehu getkH() {
        return kH;
    }

    public void setkH(Kehu kH) {
        this.kH = kH;
    }

    @Basic
    @Column(name = "hh_danhao", nullable = true, length = 200)
    public String getHhDanhao() {
        return hhDanhao;
    }

    public void setHhDanhao(String hhDanhao) {
        this.hhDanhao = hhDanhao;
    }

    @Basic
    @Column(name = "hh_time", nullable = false)
    public Timestamp getHhTime() {
        return hhTime;
    }

    public void setHhTime(Timestamp hhTime) {
        this.hhTime = hhTime;
    }

    @Basic
    @Column(name = "hh_yuanyin", nullable = true, length = 200)
    public String getHhYuanyin() {
        return hhYuanyin;
    }

    public void setHhYuanyin(String hhYuanyin) {
        this.hhYuanyin = hhYuanyin;
    }

    @Basic
    @Column(name = "hh_zhuangtai", nullable = true, length = 200)
    public String getHhZhuangtai() {
        return hhZhuangtai;
    }

    public void setHhZhuangtai(String hhZhuangtai) {
        this.hhZhuangtai = hhZhuangtai;
    }

    @Basic
    @Column(name = "hh_fangshi", nullable = true, length = 200)
    public String getHhFangshi() {
        return hhFangshi;
    }

    public void setHhFangshi(String hhFangshi) {
        this.hhFangshi = hhFangshi;
    }

    @Basic
    @Column(name = "hh_wuliugs", nullable = true, length = 200)
    public String getHhWuliugs() {
        return hhWuliugs;
    }

    public void setHhWuliugs(String hhWuliugs) {
        this.hhWuliugs = hhWuliugs;
    }


    @ManyToOne
    @JoinColumn(name = "dd_id", referencedColumnName = "dd_id")
    public Dingdan getDingdanByDdId() {
        return dingdanByDdId;
    }

    public void setDingdanByDdId(Dingdan dingdanByDdId) {
        this.dingdanByDdId = dingdanByDdId;
    }

    @ManyToOne
    @JoinColumn(name = "fh_id", referencedColumnName = "fh_id")
    public Fahuo getFahuo() {
        return fahuo;
    }

    public void setFahuo(Fahuo fahuo) {
        this.fahuo = fahuo;
    }
}
